package com.sanchezsolutions.swing;

import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class RegisterCourse extends JPanel {

	JTextField txtCod;
	JTextField txtName;
	JTextArea txtContent;
	JTextField txtAcademicHours;
	JTextField txtUsedHours;
	JTextField txtCost;
	
	public RegisterCourse() {
		setLayout(new GridLayout(7, 2));
		setBorder(BorderFactory.createTitledBorder("Registrar Curso"));
		
		JLabel lbl = new JLabel("Codigo");
		add(lbl);
		
		txtCod = new JTextField(10);
		add(txtCod);
		
		lbl = new JLabel("Nombre");
		add(lbl);
		
		txtName = new JTextField(10);
		add(txtName);
		
		lbl = new JLabel("Contenido");
		add(lbl);
		
		txtContent = new JTextArea(20, 100);
		add(txtContent);
		
		lbl = new JLabel("Horas Academicas");
		add(lbl);
		
		txtAcademicHours = new JTextField(10);
		add(txtAcademicHours);
		
		lbl = new JLabel("Horas Laboratorio");
		add(lbl);
		
		txtUsedHours = new JTextField(10);
		add(txtUsedHours);
		
		lbl = new JLabel("Costo");
		add(lbl);
		
		txtCost = new JTextField(10);
		add(txtCost);
		
		JButton btnInsert = new JButton("Insertar");
		add(btnInsert);
		
		JButton btnCancel = new JButton("Cancelar");
		btnCancel.setPreferredSize(new Dimension(50, 10));
		add(btnCancel);
	}
	
	

}
